<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" session="false" %>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- 
  - Author(s): 11001992
  - Date: 2017-03-09 21:48:57
  - Description:
-->
<head>
<title>解决主键冲突</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="<%= request.getContextPath() %>/common/nui/nui.js" type="text/javascript"></script>
    
</head>
<body>
		增加数量：<input type="text" id="count" />
		<br />
		实体名称：<input type="text" id="entiy" />
		</br />
		主键名称：<input type="text" id="key" />
		<br />
		<button onclick="updatePk()">执行</button>
		<div id="pk"></div>

	<script type="text/javascript">
    	nui.parse();
    	function updatePk(){
    	var count = $("#count")[0].value;
    	var entiy = $("#entiy")[0].value;
    	var key = $("#key")[0].value;
    		nui.ajax({
			         url: "org.gocom.components.coframe.expand.bsvotingbaseinfobiz.updatePK.biz.ext",
			         type: 'POST',
			         data: {count:count,entiy:entiy,key:key},
			         cache: false,
			         contentType:'text/json',
			         cache: false,
			         async: false,//非异步，即同步
			         success: function (ret) {
			        if(ret.exception==null||ret.exception==""){
			           	$("#pk")[0].innerHTML="主键为："+ret.pk;
			            }	 
			         }
			     }); 
    	
    	
    	}
    </script>
</body>
</html>